#ifndef CONTROLWIDGET_H
#define CONTROLWIDGET_H

#include <QDialog>

namespace Ui {
class ControlWidget;
}

class SRMediaPlayer; // 前向声明

class ControlWidget : public QDialog
{
    Q_OBJECT

public:
    explicit ControlWidget(QWidget *parent = nullptr);
    ~ControlWidget();

signals:
    void volumeChanged(int volume);  // 发出音量改变的信号

public slots:
    // 进度条
    void on_progressSliderValueChanged(int position);
    void on_durationChanged(qint64 duration);
    // 音量设置
    void on_SoundSlider_valueChanged(int value);

private:
    Ui::ControlWidget *ui;
    SRMediaPlayer *mainWindow; // 添加成员变量
};

#endif // CONTROLWIDGET_H
